﻿using System;
using System.Windows.Media;
using System.Windows.Data;

namespace ReflectionStudio.Controls
{
	
    [ValueConversion(typeof(object), typeof(object))]
    public class BGColorConverter : IValueConverter
	{
		/// <summary>
		/// IValueConverter.Convert
		/// </summary>
		/// <param name="value"></param>
		/// <param name="targetType"></param>
		/// <param name="parameter"></param>
		/// <param name="culture"></param>
		/// <returns></returns>
		public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
            if (value.ToString().Trim() =="ZZZZ")
            {
                return new SolidColorBrush(Colors.Red);
            }

            else
            {
                return new SolidColorBrush(Colors.White);
            }
        }
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return "";
           // throw new NotImplementedException();
        }
	}  
}
